﻿<%@ Page Title="我的资料" Language="C#" MasterPageFile="~/Common1.Master" AutoEventWireup="true" CodeBehind="User1.aspx.cs" Inherits="loginWeb.User1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    &nbsp;&nbsp;&nbsp;<asp:Label ID="Label1" runat="server" Visible="False"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:FormView ID="FormView1" runat="server" AllowPaging="True" CellPadding="4" DataKeyNames="登录名,邮箱" DataSourceID="SqlDataSource1" ForeColor="#333333" Height="299px" style="font-size: x-large; margin-left: 208px" Width="364px">
    <EditItemTemplate>
        登录名:
        <asp:Label ID="登录名Label1" runat="server" Text='<%# Eval("登录名") %>' />
        <br />
        密码:
        <asp:TextBox ID="密码TextBox" runat="server" Text='<%# Bind("密码") %>' />
        <br />
        一句话:
        <asp:TextBox ID="一句话TextBox" runat="server" Text='<%# Bind("一句话") %>' />
        <br />
        wechat:
        <asp:TextBox ID="wechatTextBox" runat="server" Text='<%# Bind("wechat") %>' />
        <br />
        年龄:
        <asp:TextBox ID="年龄TextBox" runat="server" Text='<%# Bind("年龄") %>' />
        <br />
        所在地:
        <asp:TextBox ID="所在地TextBox" runat="server" Text='<%# Bind("所在地") %>' />
        <br />
        邮箱:
        <asp:Label ID="邮箱Label1" runat="server" Text='<%# Eval("邮箱") %>' />
        <br />
        <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="更新" />
&nbsp;&nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="取消" />
    </EditItemTemplate>
    <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
    <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
    <InsertItemTemplate>
        登录名:
        <asp:TextBox ID="登录名TextBox" runat="server" Text='<%# Bind("登录名") %>' />
        <br />
        密码:
        <asp:TextBox ID="密码TextBox" runat="server" Text='<%# Bind("密码") %>' />
        <br />
        一句话:
        <asp:TextBox ID="一句话TextBox" runat="server" Text='<%# Bind("一句话") %>' />
        <br />
        wechat:
        <asp:TextBox ID="wechatTextBox" runat="server" Text='<%# Bind("wechat") %>' />
        <br />
        年龄:
        <asp:TextBox ID="年龄TextBox" runat="server" Text='<%# Bind("年龄") %>' />
        <br />
        所在地:
        <asp:TextBox ID="所在地TextBox" runat="server" Text='<%# Bind("所在地") %>' />
        <br />
        邮箱:
        <asp:TextBox ID="邮箱TextBox" runat="server" Text='<%# Bind("邮箱") %>' />
        <br />
        <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="插入" />
&nbsp;&nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="取消" />
    </InsertItemTemplate>
    <ItemTemplate>
        登录名:
        <asp:Label ID="登录名Label" runat="server" Text='<%# Eval("登录名") %>' />
        <br />
        密码:
        <asp:Label ID="密码Label" runat="server" Text='<%# Bind("密码") %>' />
        <br />
        一句话:
        <asp:Label ID="一句话Label" runat="server" Text='<%# Bind("一句话") %>' />
        <br />
        wechat:
        <asp:Label ID="wechatLabel" runat="server" Text='<%# Bind("wechat") %>' />
        <br />
        年龄:
        <asp:Label ID="年龄Label" runat="server" Text='<%# Bind("年龄") %>' />
        <br />
        所在地:
        <asp:Label ID="所在地Label" runat="server" Text='<%# Bind("所在地") %>' />
        <br />
        邮箱:
        <asp:Label ID="邮箱Label" runat="server" Text='<%# Eval("邮箱") %>' />
        <br />
        <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit" Text="编辑" />
        &nbsp;&nbsp;<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New" Text="新建" />
    </ItemTemplate>
    <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
    <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="CompareAllValues" ConnectionString="<%$ ConnectionStrings:dhd2014112109ConnectionString %>" DeleteCommand="DELETE FROM [Users1] WHERE [登录名] = @original_登录名 AND [邮箱] = @original_邮箱 AND [密码] = @original_密码 AND (([一句话] = @original_一句话) OR ([一句话] IS NULL AND @original_一句话 IS NULL)) AND (([wechat] = @original_wechat) OR ([wechat] IS NULL AND @original_wechat IS NULL)) AND (([年龄] = @original_年龄) OR ([年龄] IS NULL AND @original_年龄 IS NULL)) AND (([所在地] = @original_所在地) OR ([所在地] IS NULL AND @original_所在地 IS NULL))" InsertCommand="INSERT INTO [Users1] ([登录名], [密码], [一句话], [wechat], [年龄], [所在地], [邮箱]) VALUES (@登录名, @密码, @一句话, @wechat, @年龄, @所在地, @邮箱)" OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT [登录名], [密码], [一句话], [wechat], [年龄], [所在地], [邮箱] FROM [Users1] WHERE ([登录名] = @登录名)" UpdateCommand="UPDATE [Users1] SET [密码] = @密码, [一句话] = @一句话, [wechat] = @wechat, [年龄] = @年龄, [所在地] = @所在地 WHERE [登录名] = @original_登录名 AND [邮箱] = @original_邮箱 AND [密码] = @original_密码 AND (([一句话] = @original_一句话) OR ([一句话] IS NULL AND @original_一句话 IS NULL)) AND (([wechat] = @original_wechat) OR ([wechat] IS NULL AND @original_wechat IS NULL)) AND (([年龄] = @original_年龄) OR ([年龄] IS NULL AND @original_年龄 IS NULL)) AND (([所在地] = @original_所在地) OR ([所在地] IS NULL AND @original_所在地 IS NULL))">
    <DeleteParameters>
        <asp:Parameter Name="original_登录名" Type="String" />
        <asp:Parameter Name="original_邮箱" Type="String" />
        <asp:Parameter Name="original_密码" Type="String" />
        <asp:Parameter Name="original_一句话" Type="String" />
        <asp:Parameter Name="original_wechat" Type="String" />
        <asp:Parameter Name="original_年龄" Type="Int32" />
        <asp:Parameter Name="original_所在地" Type="String" />
    </DeleteParameters>
    <InsertParameters>
        <asp:Parameter Name="登录名" Type="String" />
        <asp:Parameter Name="密码" Type="String" />
        <asp:Parameter Name="一句话" Type="String" />
        <asp:Parameter Name="wechat" Type="String" />
        <asp:Parameter Name="年龄" Type="Int32" />
        <asp:Parameter Name="所在地" Type="String" />
        <asp:Parameter Name="邮箱" Type="String" />
    </InsertParameters>
    <SelectParameters>
        <asp:ControlParameter ControlID="Label1" Name="登录名" PropertyName="Text" Type="String" />
    </SelectParameters>
    <UpdateParameters>
        <asp:Parameter Name="密码" Type="String" />
        <asp:Parameter Name="一句话" Type="String" />
        <asp:Parameter Name="wechat" Type="String" />
        <asp:Parameter Name="年龄" Type="Int32" />
        <asp:Parameter Name="所在地" Type="String" />
        <asp:Parameter Name="original_登录名" Type="String" />
        <asp:Parameter Name="original_邮箱" Type="String" />
        <asp:Parameter Name="original_密码" Type="String" />
        <asp:Parameter Name="original_一句话" Type="String" />
        <asp:Parameter Name="original_wechat" Type="String" />
        <asp:Parameter Name="original_年龄" Type="Int32" />
        <asp:Parameter Name="original_所在地" Type="String" />
    </UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
